{{#extends @html/widget/hp/widget.html}}
{{:widget_div_name}}gallery{{/:widget_div_name}}

{{:widget_body}}
	<div class="typography">
		{{?widget.render_type==0}}{{@:menu_0 *=widget.items}}{{/?}}
		{{?widget.render_type==1}}{{@:menu_1 *=widget.items}}{{/?}}
		{{?widget.render_type==2}}{{@:menu_2 *=widget.items}}{{/?}}
	</div>
{{/:widget_body}}

{{:menu_0}}
<ul class="menu-">{{!for * do=@:menu}}</ul>
{{/:menu_0}}

{{:menu}}
<li><a class="s{{*color}}" href="{{*link}}">{{*name}}</a></li>
{{/:menu}}

{{:menu_1}}
<nobr>{{!for * do=@:menu_1i}}</nobr>
{{/:menu_1}}

{{:menu_1i}}
<a class="s{{*color}}" href="{{*link}}">{{*name}}</a>&nbsp;&nbsp;
{{/:menu_1i}}


{{:menu_2}}
{{!for * do=@:menu_1i}}
{{/:menu_2}}


{{:settings}}
<div class="popup-body" id="settings_container"><div class="bg1-">
	<form action="" id="settingsform">
	<input type="hidden" name="widget_id" value="{{settings.id}}" id="widget_id" />
	<h2 class="title-">Настройка меню</h2>
	<div class="content-">
		<fieldset class="fieldset- header- text-">
			<label>Заголовок</label>
			<input type="text" name="title" value="{{settings.title}}"/>
			<div class="comment-">Не более 100 символов</div>
		</fieldset>
		<fieldset class="fieldset- select-">
			<label>Вид</label>
			<select name="render_type">
				<option value="0"{{?settings.render_type==0}} selected{{/?}}>Списком</option>
				<option value="1"{{?settings.render_type==1}} selected{{/?}}>Горизонтально</option>
				<option value="2"{{?settings.render_type==2}} selected{{/?}}>Потоком</option>
			</select>
		</fieldset>
		<div style="overflow: auto; height: 200px;">
			<fieldset class="fieldset- text-" id="cm_add_link_tpl" style="display: none;">
				<input type="text" style="width: 100px;" value="__TITLE__"/>
				<input type="text" style="width: 100px;" value="__LINK__"/>
				<a href="#">Вверх</a>
				<a href="#">Вниз</a>
				<a href="#">Удалить</a>
			</fieldset>
		</div>
		<a href="#" id="cm_add_link_btn">Добавить ссылку</a>
		<input type="hidden" name="links" id="cm_result_links"/>
	</div>
	{{@:settingsbutton}}
	</form>
</div></div>
<script type="text/javascript">
new CmsMenuSettings("{{settings.links}}");
</script>
{{/:settings}}
